library(qs)
## qs 0.27.3. Announcement: https://github.com/qsbase/qs/issues/103
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.1 ✔ stringr 1.5.2
## ✔ ggplot2 4.0.0 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.1.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
source("../experiments/plot_function.R")
files <- list.files("results",full.names = T)
for (i_df in seq_along(files)) {
res <- qread(files[i_df])
plot_data <- res$full_df$true_data_generation$plot
# Extract components
name <- sub("results/estimate_(.*)_n_.*\\.qs", "\\1", files[i_df])
n <- sub(".*_n_([0-9]+)\\.qs", "\\1", files[i_df])
# Format a nice title
cat("#", toupper(sub("_", " ", name)), "with n =", n, "\n")
plot(plot_data)
plot_cumhazards(res)
}
## # CONST HAZARD with n = 100


## # CONST HAZARD with n = 1000


## # CONST HAZARD with n = 2000


## # CONST HAZARD with n = 500


## # GENERAL POLY_HAZARD with n = 100


## # GENERAL POLY_HAZARD with n = 1000


## # GENERAL POLY_HAZARD with n = 2000


## # GENERAL POLY_HAZARD with n = 500


## # WIEBULL HAZARD with n = 100


## # WIEBULL HAZARD with n = 1000


## # WIEBULL HAZARD with n = 2000


## # WIEBULL HAZARD with n = 500

